// import "./index.css";
import { defineComponent } from "vue";

/** 分段器组件 */
import Segmented from "@/components/ReSegmented";

const props = {
  title: {
    type: String,
    default: ""
  }
};

export default defineComponent({
  name: "ReTimePicker",
  props,
  setup(props) {
    const optionsBasis: Array<any> = [
      {
        label: "昨日" // 0
      },
      {
        label: "本周" //1
      },
      {
        label: "本月" //2
      },
      {
        label: "本年" //3
      },
      {
        label: "自定义" //4,
      }
    ];

    return () => (
      <el-card class="bar-card" shadow="never">
        <div className="py-1">{props.title}</div>
        <div>
          <Segmented options={optionsBasis} />
          <el-date-picker
            type="daterange"
            range-separator="To"
            start-placeholder="开始时间"
            end-placeholder="结束时间"
            size="default"
            format="YYYY/MM/DD"
            value-format="x"
          />
        </div>
      </el-card>
    );
  }
});
